﻿ {include file="public/header" /}
<title></title>
</head>

<body>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 系统管理 <span class="c-gray en">&gt;</span> 更新日志列表
		<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="page-container">
		<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l">
		<a href="javascript:;" onclick="iteration_add('添加更新日志','{:url('iteration_add')}','400','400')"  class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加更新日志</a></span> <span class="r"> </div>
	<table class="table table-border table-bordered table-bg">
		<thead>
			<tr class="text-c">
				<th width="40">ID</th>
				<th>标题</th>
				<th width="130">增加时间</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
			{volist name="data" id="vo" empty="这里没有数据"}
			<tr class="text-c">
				<td>{$vo.id}</td>
				<td>{$vo.title}</td>
				<td>{$vo.add_time}</td>
				<td class="td-manage">
					<a title="编辑" href="javascript:;" onclick="iteration_edit('更新日志编辑','{:url('sys/iteration_edit',['id'=>$vo.id])}','400','400')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>
					<a title="删除" href="javascript:;" onclick="iteration_del(this,{$vo.id})" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
				</td>
			</tr>
			{/volist}
			</tbody>
			</table>
		</div>
		{include file="public/footer" /}
		<script type="text/javascript">
			/*管理员-增加*/
			function iteration_add(title, url, w, h) {
				layer_show(title, url, w, h);
			}

			/*管理员-删除*/
			function iteration_del(obj, id) {
				layer.confirm('确认要删除吗？', {
					btn: ['确定', '取消'] //按钮
				}, function() {
					$.ajax({
						type: 'get',
						url: "{:url('sys/iteration_del')}",
						dataType: 'json',
						data: {
							id: id
						},
						success: function(data) {
							if(data.code == 200) {
								$(obj).parents("tr").remove();
								layer.msg(data.msg, {
									icon: 1,
									time: 1000
								});
							} else {
								layer.msg(data.msg, {
									icon: 1,
									time: 1000
								});
							}
						},
						error: function(data) {
							console.log(data.msg);
						}
					});
				});
			}

			/*管理员-编辑*/
			function iteration_edit(title, url, w, h) {
				layer_show(title, url, w, h);
			}

		</script>